using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._MosaicDataset
{
    /// <summary>
    /// <para>Edit Raster Function</para>
    /// <para>Adds, replaces, or removes a function chain in a mosaic dataset or a raster layer that contains a raster function.</para>
    /// <para>添加、替换或移除镶嵌数据集或包含栅格函数的栅格图层中的函数链。</para>
    /// </summary>    
    [DisplayName("Edit Raster Function")]
    public class EditRasterFunction : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public EditRasterFunction()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_mosaic_dataset">
        /// <para>Input Raster</para>
        /// <para>The mosaic dataset or a raster layer. If you use a raster layer, it must have a function applied.</para>
        /// <para>镶嵌数据集或栅格图层。如果使用栅格图层，则栅格图层必须应用函数。</para>
        /// </param>
        public EditRasterFunction(object _in_mosaic_dataset)
        {
            this._in_mosaic_dataset = _in_mosaic_dataset;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Edit Raster Function";

        public override string CallName => "management.EditRasterFunction";

        public override List<string> AcceptEnvironments => ["scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_mosaic_dataset, _edit_mosaic_dataset_item.GetGPValue(), _edit_options.GetGPValue(), _function_chain_definition, _location_function_name, _out_raster];

        /// <summary>
        /// <para>Input Raster</para>
        /// <para>The mosaic dataset or a raster layer. If you use a raster layer, it must have a function applied.</para>
        /// <para>镶嵌数据集或栅格图层。如果使用栅格图层，则栅格图层必须应用函数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_mosaic_dataset { get; set; }


        /// <summary>
        /// <para>Mosaic Dataset Items</para>
        /// <para><xdoc>
        ///   <para>Applies the function chain to every item in the mosaic dataset individually or to the mosaic dataset as a whole.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Edits affect the functions associated with the mosaic dataset. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Edits affect the functions associated with all of the items within the mosaic dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将函数链单独应用于镶嵌数据集中的每个项目，或将功能链应用于整个镶嵌数据集。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 编辑会影响与镶嵌数据集关联的函数。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 编辑会影响与镶嵌数据集中所有项目关联的函数。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Mosaic Dataset Items")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _edit_mosaic_dataset_item_value _edit_mosaic_dataset_item { get; set; } = _edit_mosaic_dataset_item_value._false;

        public enum _edit_mosaic_dataset_item_value
        {
            /// <summary>
            /// <para>EDIT_MOSAIC_DATASET_ITEM</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("EDIT_MOSAIC_DATASET_ITEM")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>EDIT_MOSAIC_DATASET</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("EDIT_MOSAIC_DATASET")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Edit Options</para>
        /// <para><xdoc>
        ///   <para>Insert, replace, or remove a function chain.</para>
        ///   <bulletList>
        ///     <bullet_item>Insert—Insert the function chain above the Function Name of the existing chain. Specify the function chain below in the Function Name parameter. This is the default.</bullet_item><para/>
        ///     <bullet_item>Replace—Replace the existing function chain with the function chain specified in this tool. Specify the function chain below in the Function Name parameter.</bullet_item><para/>
        ///     <bullet_item>Remove— Remove the function chain starting from the function specified in the Function Name parameter.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>插入、替换或删除功能链。</para>
        ///   <bulletList>
        ///     <bullet_item>插入 （Insert） - 将函数链插入到现有链的函数名称（Function Name） 上方。在 Function Name 参数中指定下面的函数链。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>替换 （Replace） - 将现有函数链替换为此工具中指定的函数链。在 Function Name 参数中指定下面的函数链。</bullet_item><para/>
        ///     <bullet_item>删除 — 删除从函数名称参数中指定的函数开始的函数链。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Edit Options")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _edit_options_value _edit_options { get; set; } = _edit_options_value._INSERT;

        public enum _edit_options_value
        {
            /// <summary>
            /// <para>Insert</para>
            /// <para>Insert—Insert the function chain above the Function Name of the existing chain. Specify the function chain below in the Function Name parameter. This is the default.</para>
            /// <para>插入 （Insert） - 将函数链插入到现有链的函数名称（Function Name） 上方。在 Function Name 参数中指定下面的函数链。这是默认设置。</para>
            /// </summary>
            [Description("Insert")]
            [GPEnumValue("INSERT")]
            _INSERT,

            /// <summary>
            /// <para>Replace</para>
            /// <para>Replace—Replace the existing function chain with the function chain specified in this tool. Specify the function chain below in the Function Name parameter.</para>
            /// <para>替换 （Replace） - 将现有函数链替换为此工具中指定的函数链。在 Function Name 参数中指定下面的函数链。</para>
            /// </summary>
            [Description("Replace")]
            [GPEnumValue("REPLACE")]
            _REPLACE,

            /// <summary>
            /// <para>Remove</para>
            /// <para>Remove— Remove the function chain starting from the function specified in the Function Name parameter.</para>
            /// <para>删除 — 删除从函数名称参数中指定的函数开始的函数链。</para>
            /// </summary>
            [Description("Remove")]
            [GPEnumValue("REMOVE")]
            _REMOVE,

        }

        /// <summary>
        /// <para>Raster Function Template</para>
        /// <para>Choose the function chain (rft.xml file) that you want to insert or replace.</para>
        /// <para>选择要插入或替换的功能链（rft.xml 文件）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Raster Function Template")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _function_chain_definition { get; set; } = null;


        /// <summary>
        /// <para>Function Name</para>
        /// <para><xdoc>
        ///   <para>Choose where to insert, replace, or remove the function chain within the existing function chain.</para>
        ///   <para>If you Insert the function, it will be inserted above the function specified in the Function Name parameter.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>选择在现有功能链中插入、替换或删除功能链的位置。</para>
        ///   <para>如果插入函数，则该函数将插入到函数名称参数中指定的函数上方。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Function Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _location_function_name { get; set; } = null;


        /// <summary>
        /// <para>Updated Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_raster { get; set; }


        public EditRasterFunction SetEnv(object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}